function xstCOMLenFn = stCOMLenFn(x)
xstCOMLenFn = sqrt((12759122123*cos(x(1)) + 14065902578*cos(x(1) + x(2)) -  ...
     1637194622*cos(x(1) + x(2) + x(3)) -  ...
     457593477*cos(x(1) + x(2) + x(3) - x(4)))^2/1205895076000000000000 +  ...
  (-12759122123*sin(x(1)) - 14065902578*sin(x(1) + x(2)) +  ...
     1637194622*sin(x(1) + x(2) + x(3)) +  ...
     457593477*sin(x(1) + x(2) + x(3) - x(4)))^2/1205895076000000000000) ...
;